home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000065_icon-group-sender _Tue Sep 16 08:00:33 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id IAA07333
for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Tue, 16 Sep 1997 08:00:32 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA02458; Tue, 16 Sep 1997 08:00:32 -0700
To: icon-group@cs.arizona.edu
Date: Tue, 16 Sep 1997 22:56:57 +1000
From: Stuart.Robinson@anu.edu.au (Stuart Robinson)
Message-Id: <Stuart.Robinson-1609972256580001@asianstmg-221.anu.edu.au>
Organization: ANU
Sender: icon-group-request@cs.arizona.edu
Subject: Problem with Program
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
I just wrote up a little program to check each line of text for the number
of times the string "#PL" appears. I want the program to put the line in
list_1 if the string shows up once, in list_2 if the string shows up
twice, in list_3 if the string show up three times, and in list_other if
it fails to show up at all or shows up more than three times. The problem
is, it doesn't work. What gives? Thanks in advance.
==========
#16 Sept 1997
#program written to print all clauses in which plurality is multiply marked
procedure main()
list_1 := []
list_2 := []
list_3 := []
otherlist_other := []
chars := &letters++-#7
count := 0
while line := read() do
{
line ?
{
while tab(upto(chars)) do
{
word := tab(many(chars))
word ?
{
if find("#PL") then count +:= 1
{
}
}
if count = 1 then put(list_1, line)
else if count = 2 then put(list_2, line)
else if count = 3 then put(list_3, line)
else put(list_other, line)
count := 0
}
write ("\n" || "LINES WITH PLURAL MARKED ONE TIME")
every write(list_1[1 to *list_1])
write ("\n" || "LINES WITH PLURAL MARKED TWO TIMES")
every write(list_2[1 to *list_2])
write ("\n" || "LINES WITH PLURAL MARKED THREE TIMES")
every write(list_3[1 to *list_3])
write ("\n" || "ALL OTHER LINES")
every write(list_other[1 to *list_other])
end
--
Stuart Robinson <Stuart.Robinson@no_spam!anu.edu.au>
The Australian National University
*TO REPLY, REMOVE "no_spam!" FROM E-MAIL ADDRESS GIVEN ABOVE